FINS Snowflake Financial System API - Implementation Template
Data mappings
This document provides information generated from the DataWeave scripts included in the project, such as function definitions, variable definitions, and data mapping tables.
Module | Description |
---|---|
accounts-request-payload | Mapping to create Financial Account in Snowflake. Maps Banking Spec account JSON to DB fields of Snowflake |
accounts-response-payload | Mapping to search Financial Account from Snowflake Maps Banking Spec account JSON to DB fields of Snowflake |
transactions-request-payload | Mapping to create Financial Transaction in Snowflake. Maps Banking Spec transaction JSON to DB fields of Snowflake |
transactions-response-payload | Mapping to search Financial Transaction in Snowflake. Maps Banking Spec transaction JSON to DB fields of Snowflake |
accounts-request-payload
Mapping to create Financial Account in Snowflake.
Maps Banking Spec account JSON to DB fields of Snowflake
Source:
./src/main/resources/dwl/accounts-request-payload.dwl
Mapping Tables
Maps Banking Spec Financial Account JSON to Snowflake DB
Banking Spec field | Snowflake DB FINANCIAL_ACCOUNT table | Description | ||
---|---|---|---|---|
id | ACCOUNT_ID | Unique Id of the account | ||
name | NAME | descriptive name of the account | ||
accountCurrency | ACCOUNT_CURRENCY | Current used for account | ||
accountStatus | ACCOUNT_STATUS | Status of the account | ||
accountType | ACCOUNT_TYPE | Discriminator property set to the specific type of account by name (example - CheckingAccount) | ||
depositAccountType | DEPOSIT_ACCOUNT_TYPE | Defines an account used for checking | savings | or money market activities |
accountNumber | ACCOUNT_NUMBER | Account number to identify the account | ||
accountBalance | ACCOUNT_BALANCE | current credit (positive) or debit (negative) balance of the account | ||
openedDate | OPENED_DATE | Opening Date of the account | ||
loanDurationMonths | LOAN_DURATION_MONTHS | loan duration for re-payment | ||
minimumPayment | LOAN_MINIMUM_PAYMENT | minimum payment to be made to the account | ||
primaryAccountOwner | PRIMARY_OWNER_ID | References the primary owner of this account by their global identifier | ||
auditInfo.createdBy | CREATED_BY | Identifies the system or user which created the entity | ||
auditInfo.createdDate | CREATED_DATETimestamp of when the entity was created - default as current timestamp | |||
auditInfo.updatedBy | UPDATED_BY | Identifies the system or user which last updated the entity | ||
auditInfo.updatedDate | UPDATED_DATE | Timestamp of when the entity was last updated | ||
auditInfo.isDeleted | IS_DELETED | Indicates whether or not the entity has been soft-deleted - default as false |
accounts-response-payload
Mapping to search Financial Account from Snowflake
Maps Banking Spec account JSON to DB fields of Snowflake
Source:
./src/main/resources/dwl/accounts-response-payload.dwl
Mapping Tables
Maps DB Fields to Banking Spec Financial Account JSON
Snowflake DB FINANCIAL_ACCOUNT table | Banking Spec | Description | ||
---|---|---|---|---|
ACCOUNT_ID | id | Unique Id of the account | ||
NAME | name | descriptive name of the account | ||
ACCOUNT_CURRENCY | accountCurrency | Current used for account | ||
ACCOUNT_STATUS | accountStatus | Status of the account | ||
ACCOUNT_TYPE | accountType | Discriminator property set to the specific type of account by name (example - CheckingAccount) | ||
DEPOSIT_ACCOUNT_TYPE | depositAccountType | Defines an account used for checking | savings | or money market activities |
ACCOUNT_NUMBER | accountNumber | Account number to identify the account | ||
ACCOUNT_BALANCE | accountBalance | current credit (positive) or debit (negative) balance of the account | ||
OPENED_DATE | openedDate | date of opening the account | ||
LOAN_DURATION_MONTHS | loanDurationMonths | loan duration for repayment | ||
MINIMUM_PAYMENT | minimumPayment | minimum payment to be made to the account | ||
CREATED_BY | auditInfo.createdBy | Identifies the system or user which created the entity | ||
CREATED_DATE | auditInfo.createdDate | Timestamp of when the entity was created - default as current timestamp | ||
UPDATED_BY | auditInfo.updatedBy | Identifies the system or user which last updated the entity | ||
UPDATED_DATE | auditInfo.updatedDate | Timestamp of when the entity was last updated | ||
IS_DELETED | auditInfo.isDeleted | Indicates whether or not the entity has been soft-deleted - default as false |
transactions-request-payload
Mapping to create Financial Transaction in Snowflake.
Maps Banking Spec transaction JSON to DB fields of Snowflake
Source:
./src/main/resources/dwl/transactions-request-payload.dwl
Mapping Tables
POST transactions Request mapping.
Banking Spec | Snowflake DB FINANCIAL_TRANSACTION table | Description | |
---|---|---|---|
id | TRANSACTION_ID | The unique transaction Id. | |
accountId | creditAccountId or debitAccountId | Account associated with the transaction | |
accountOwnerId | ACCOUNT_OWNER_ID | The primary owner of the account this transaction was created for | |
name | NAME | Display name of the transaction | |
transactionNumber | TRANSACTION_NUMBER | A unique number assigned to this transaction | |
transactionAmount | TRANSACTION_AMOUNT | Amount associated with the transaction | |
transactionType | TRANSACTION_TYPE | Discriminator property set to the specific type of transaction by name (e.g. | CreditTransaction) |
transactionSubType | TRANSACTION_SUBTYPE | Sub type of the transaction | |
transactionStatus | TRANSACTION_STATUS | Status of the transaction | |
transactionDate | TRANSACTION_DATE | Date the transaction was recorded in the system | |
isDisputed | IS_DISPUTED | ||
auditInfo.isDeleted | IS_DELETED | Default to false | |
auditInfo.createdBy | CREATED_BY | CreatedBy user | |
auditInfo.updatedBy | UPDATED_BY | The name of user updated | |
auditInfo.updatedDate | UPDATED_DATE | The updated date | |
auditInfo.createdDate | CREATED_DATE | The Created date |
transactions-response-payload
Mapping to search Financial Transaction in Snowflake.
Maps Banking Spec transaction JSON to DB fields of Snowflake
Source:
./src/main/resources/dwl/transactions-response-payload.dwl
Functions
fun formatDate (dateToformat)
Function to format the date
param
dateToformat
date that needs to be formatted
return date formatted date with no time
Mapping Tables
Maps Snowflake to Banking Spec Transaction mapping
Banking Spec | Snowflake DB FINANCIAL_TRANSACTION table | Description | |
---|---|---|---|
id | TRANSACTION_ID | The unique transaction Id. | |
creditAccountId or debitAccountId | ACCOUNT_ID | Account associated with the transaction and transaction type | |
accountOwnerId | ACCOUNT_OWNER_ID | The primary owner of the account this transaction was created for | |
name | NAME | Display name of the transaction | |
transactionNumber | TRANSACTION_NUMBER | A unique number assigned to this transaction | |
transactionAmount | TRANSACTION_AMOUNT | Amount associated with the transaction | |
transactionType | TRANSACTION_TYPE | Discriminator property set to the specific type of transaction by name (e.g. | CreditTransaction) |
transactionSubType | TRANSACTION_SUBTYPE | Sub type of the transaction | |
transactionStatus | TRANSACTION_STATUS | Status of the transaction | |
transactionDate | TRANSACTION_DATE | Date the transaction was recorded in the system | |
isDisputed | IS_DISPUTED | ||
auditInfo.isDeleted | IS_DELETED | Default to false | |
auditInfo.createdBy | CREATED_BY | CreatedBy user | |
auditInfo.updatedBy | UPDATED_BY | The name of user updated | |
auditInfo.updatedDate | UPDATED_DATE | The updated date | |
auditInfo.createdDate | CREATED_DATE | The Created date |